package org.bt.common.validator;

import org.bt.common.validator.aspect.NotNull;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * NotNullValidator
 * <p>
 * Created on 2020/1/9
 *
 * @author tongw
 */
public class NotNullValidator implements ConstraintValidator<NotNull, Object> {
    public NotNullValidator() {
    }

    @Override
    public boolean isValid(Object object, ConstraintValidatorContext constraintValidatorContext) {
        return object != null;
    }
}